<?php
namespace Efy;

class Application
{
	protected static $_instance = null;
 	public static function getInstance()
    {
        if (null === self::$_instance) {
            self::$_instance = new self();
        }

        return self::$_instance;
    }
	public function run()
	{
		$dbConn = new \Efy\Db\Connection();
		$db = \Efy\Config::getInstance()->db();
		//Connect DB
		$connAdo = $dbConn->connectADO($db->adapter,array(
														'host' => $db->config->host,
														'username' => $db->config->username,
														'password' => $db->config->password,
														'dbname' => $db->config->dbname,
														'pathAdoCache' => $db->config->pathAdoCache,
														'cachetimeout' => $db->config->cachetimeout,
													));
		//Init Session
		\Efy\Init\Session::getInstance()->init();
	}
}